package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.business.dto.NewAgreementStatusUpdatedDTO;
import com.yuanfeng.business.entity.ShopAgreementEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName ShopAgreementMapper
 * @Description 店铺协议
 * @Author cf
 * @Date 2023/6/26 9:35
 * @Version 1.0
 */
@Mapper
public interface ShopAgreementMapper extends BaseMapper<ShopAgreementEntity> {


    /**
     * 查询协议id
     * @return
     */
    Integer selectNewAgreement();


    /**
     * 查询当前协议商家是否同意
     * @param shopId
     * @param agreementId
     * @return
     */
    Integer selectShopAgreement(@Param("shopId") Integer shopId, @Param("agreementId") Integer agreementId);

    /**
     * 更新最新店铺协议
     *
     * @param param
     *
     */
    void insertNewAgreementStatus(@Param("param")NewAgreementStatusUpdatedDTO param);

}
